import instance from "@/axios";

export const getArticlePageList= (data) => {
    return instance({
        url: '/admin/article/list',
        method: 'POST',
        data
    })
}
export const deleteArticle = (id) => {
    return instance({
        url: '/admin/article/delete',
        method: 'POST',
        data: {id}
    })
} 
export const publishArticle = (data) => {
    return instance({
        url: '/admin/article/publish',
        method: 'POST',
        data
    })
}
// 获取文章详情
export const getArticleDetail = (id) => {
    return instance({
        url: '/admin/article/detail',
        method: 'POST',
        data: {id}
    })
}
export const updateArticle = (data) => {
    return instance({
        url: '/admin/article/update',
        method: 'POST',
        data
    })
}

export const updateArticleIsTop = (data) => {
    return instance({
        url: '/admin/article/isTop/update',
        method: 'POST',
        data
    })
}